<template>
    <div id="app">
      <el-form :model="repair" label-width="100px">
        <el-form-item label="设备" prop="name">
          <el-input v-model="repair.name"></el-input>
        </el-form-item>

        <el-form-item label="故障描述" prop="pwd">
          <el-input v-model="repair.wrongDescription"  type="textarea" rows="5"></el-input>
        </el-form-item>

        <el-form-item label="描述" prop="gender">
          <el-input v-model="repair.description"  type="textarea" rows="5"></el-input>
        </el-form-item>
        <el-form-item label="报备人" prop="description">
          <el-input v-model="repair.reporter"></el-input>
        </el-form-item>

        <el-form-item>
          <el-button type="primary" @click.prevent="test">保存</el-button>
        </el-form-item>
      </el-form>
    </div>
</template>

<script>
    export default {
      data(){
        return {
          repair:{}
        }
      },
      methods:{
        test(){

            this.$confirm("是否确认提交","保存提示").then(()=>{
              this.axios.post("/repair/add",this.repair).then((resp)=>{
                  this.$message.success("保存成功！");
                  this.$router.push("/repair/RepairList")
                });
            });

        }
      }
    }
</script>


<style scoped>

</style>
